<?php
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'basic';
$return=array();
$plugin_name = $_RQ['basicname'] ? $_RQ['basicname'] : '';
if($_RQ['op']=='basic'){
	if($_RQ['postdata']){
		$postdata=get_postdata();
		$this->plugin_setting('setting',$postdata);
		exi('设置成功');
	}
	$item=$this->plugin_setting('setting');
	$return['item'] = $item;
	$htmls=array(
		'type'=>'edit',
		'desc'=>'商品绑定',
		'edit_tab'=>true,
		'edit'=>array(
					array('name'=>'group_id','title'=>'绑定分类','type'=>'select','options'=>'groups','help'=>'只能绑定一级分类，绑定一级分类下面所有商品！'),
				)
			);
	$return['htmls']=$htmls;
	$return['groups']=pdo_getall('jy_weishop_goods_group',array('uniacid'=>$_SESSION['uniacid'],'parentid'=>0),array('id','title'));
	exi($return);
}

